<template>
  <div id="app">
    <router-view/>
    <van-tabbar route v-model="active" active-color="#F46D01" inactive-color="#777777" v-if="routerFalg">
      <van-tabbar-item replace to="/" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item replace to="/about" icon="search">分类</van-tabbar-item>
      <van-tabbar-item replace to="/list" icon="home-o">购物车</van-tabbar-item>
      <van-tabbar-item replace to="/mine" icon="search">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<style leng="scss">
@import url('./assets/css/base.scss');
</style>
<script>
import  { mapMutations , mapState }  from  'vuex';
export default {
    data(){
        return {
           active:0
        }
    },
    methods:{
         ...mapMutations(["initUser"])
    },
	computed:{
		...mapState(['routerFalg'])
	},
    created(){
         this.initUser();
		 
    }
}
</script>